package com.mercury.pattern._07_decorator;

import com.mercury.pattern._07_decorator.coffee.LongBlack;
import com.mercury.pattern._07_decorator.seasoning.Chocolate;
import com.mercury.pattern._07_decorator.seasoning.Milk;

/**
 *
 */
public class Client {
    public static void main(String[] args) {
        //2 份巧克力+一份牛奶的 LongBlack
        Drink order = new LongBlack();
        order = new Milk(order);
        order = new Chocolate(order);
        order = new Chocolate(order);

        System.out.println(order.cost());

    }
}